package main.com.dhj.test01

object test01 {

    def main(args: Array[String]): Unit = {
        println("Hello, world!");
        // 常量，不可修改。
        val x = 9;
        var y = 9;
        y = y +x;
        println(x);
        println(y);

        println({val x = 1 +1; x + 1; var y = 22; y +4;});

        saidHello("张三ZS");
        println(add(1, 3));
    }

    private val saidHello = (name: String) => {
        println("saidHello function: " + name + " test.");
    }

    val add = (x: Int, y: Int) => x + y

}

